//
//  ChangeUserMessageVC.m
//  WZCLApp
//
//  Created by chirui on 2018/7/4.
//  Copyright © 2018年 Shui. All rights reserved.
//

#import "ChangeUserMessageVC.h"

@interface ChangeUserMessageVC ()
@property (weak, nonatomic) IBOutlet UIButton *userImageBtn;
@property (weak, nonatomic) IBOutlet UILabel *numberLabel;
@property (weak, nonatomic) IBOutlet UITextField *nameText;
@property (weak, nonatomic) IBOutlet UILabel *nexLabel;
@property (weak, nonatomic) IBOutlet UILabel *cityLabel;
@property (weak, nonatomic) IBOutlet UILabel *yearLabel;
@property (weak, nonatomic) IBOutlet UILabel *schoolLabel;
@property (weak, nonatomic) IBOutlet UILabel *wantSchoolLabel;
@property (weak, nonatomic) IBOutlet UIScrollView *scrollView;

@end

@implementation ChangeUserMessageVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    TitleView(@"学员信息");
    [self creatScrollView];
    
    
    self.navigationItem.leftBarButtonItem = [UIBarButtonItem itemWithIcon:@"icon_return_back" target:self action:@selector(backBtnClick)];
    
}

-(void)backBtnClick{
    
    [self.navigationController popViewControllerAnimated:YES];
}


-(void)creatScrollView{
    
    _scrollView.backgroundColor = [UIColor groupTableViewBackgroundColor];
    _scrollView.showsVerticalScrollIndicator =NO;
    _scrollView.contentSize = CGSizeMake(WIDTH, 667);
    _scrollView.userInteractionEnabled=YES;
    _scrollView.scrollEnabled =YES;
    _userImageBtn.layer.cornerRadius = _userImageBtn.frame.size.height/2.f;
    _userImageBtn.layer.masksToBounds = YES;
    
}

- (IBAction)sureBtnClick:(id)sender {
    
    
    
}

//// 没有图片的
//-(void)changeMessageRequest {
//
//    NSString * parametersStr = [NSString stringWithFormat:@"%@%@",address_url,center_changeMessage_api];
//    NSDictionary * dic = @{@"user_id":USER_DEFAULTGet(@"user_id"),
//                           @"token":USER_DEFAULTGet(@"token"),
//                           @"user_name":_nameText.text,
//                           @"idcard":_cardNumber.text,
//                           @"nick_name":_nickName.text,
//                           @"birthday":_brithdayLabel.text,
//                           @"gender":_sexText.text,
//                           @"addr":_addressText.text,
//                           @"phone":_phoneText.text,
//                           };
//
//    SHuiMBhubNoTimeStr(@"正在提交...");
//    [PostNetWorking postNetWorkingStr:parametersStr andparameters:dic Success:^(id responseObject) {
//        SHuiMBHidleYes;
//        if ([responseObject[@"code"] intValue]== 200) {
//
//            SHuiMBhudTextTimeStr(@"提交成功");
//
//            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
//
//                [self.navigationController popToRootViewControllerAnimated:YES];
//            });
//
//        }else{
//
//            SHuiMBhudTextTimeStr(responseObject[@"mark"]);
//            //            [KVNProgress showErrorWithStatus:responseObject[@"mark"] onView:self.view];
//        }
//
//    } failed:^(NSError *error) {
//
//        SHuiMBHidleYes;
//
//        SHuiMBhudTextTimeStr(@"网络错误，请稍后再试");    }];
//
//}
//
//// 只有头像的
//-(void)upIconImageRequestFor:(NSData*)data {
//
//    NSString * parametersStr = [NSString stringWithFormat:@"%@%@",address_url,center_changeMessage_api];
//    NSDictionary * dic = @{@"user_id":USER_DEFAULTGet(@"user_id"),
//                           @"token":USER_DEFAULTGet(@"token"),
//                           @"user_name":_nameText.text,
//                           @"idcard":_cardNumber.text,
//                           @"nick_name":_nickName.text,
//                           @"birthday":_brithdayLabel.text,
//                           @"gender":_sexText.text,
//                           @"addr":_addressText.text,
//                           @"phone":_phoneText.text,
//                           };
//
//
//    AFHTTPSessionManager * manager = [AFHTTPSessionManager manager];
//    manager.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/html"];
//    SHuiMBhubNoTimeStr(@"正在提交...");
//    [manager POST:parametersStr parameters:dic constructingBodyWithBlock:^(id<AFMultipartFormData>  _Nonnull formData){
//
//        NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
//        formatter.dateFormat = @"yyyyMMddHHmmss";
//        NSString *str = [formatter stringFromDate:[NSDate date]];
//        NSString *fileName = [NSString stringWithFormat:@"%@.png", str];
//        [formData appendPartWithFileData:data name:@"avatar" fileName:fileName mimeType:@"image/png"];
//
//    } progress:^(NSProgress * _Nonnull uploadProgress) {
//
//        //打印下上传进度
//    } success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
//        SHuiMBHidleYes;
//        if ([responseObject[@"code"] intValue]==200) {
//
//
//            SHuiMBhudTextTimeStr(@"提交成功");
//
//            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
//
//                [self.navigationController popViewControllerAnimated:YES];
//            });
//
//        }else{
//
//            SHuiMBhudTextTimeStr(responseObject[@"mark"]);
//        }
//
//    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error){
//
//        SHuiMBHidleYes;
//
//        SHuiMBhudTextTimeStr(@"网络错误，请稍后再试");
//
//    } ];
//
//}


@end
